package com.base.common.persistent.dao;

import java.util.List;

import org.apache.ibatis.annotations.Param;

import com.base.common.persistent.model.Terminal;
import com.base.common.persistent.model.User;

public interface UserMapper {

	/**
	 * 根据手机号查询用户信息个数
	 * 
	 * @param phone
	 * @return
	 */
	public List<User> queryUserByPhone(@Param(value = "phone") String phone);

	/**
	 * 增加用户终端中间表记录
	 * 
	 * @param userId
	 * @param terminalId
	 * @return
	 */
	public int addUserInfo(@Param(value = "userId") int userId,
			@Param(value = "terminalId") int terminalId);

	/**
	 * 用户登录
	 * 
	 * @param code
	 * @param phone
	 * @return
	 */
	public List<User> login(Terminal terminal);

}
